From: Karel Klíc Date: Sat, 1 May 2010 02:58:41 +0000 (-0700) Subject: * src/fileio.c (Ffile_selinux_context): Context functions may return null. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~844^2~4920 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=45841e65c92834e743320ca54d14dd0887671c25;p=emacs.git * src/fileio.c (Ffile_selinux_context): Context functions may return null. --- diff --git a/src/ChangeLog b/src/ChangeLog index e543fe7655f..3f6a45a4118 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2010-05-01 Karel Klíč + + * fileio.c (Ffile_selinux_context): Context functions may return null. + 2010-04-30 Dan Nicolaescu * s/gnu.h (POSIX_SIGNALS): diff --git a/src/fileio.c b/src/fileio.c index 4bfbae91844..13825a54212 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -2918,10 +2918,14 @@ if file does not exist, is not accessible, or SELinux is disabled */) if (conlength > 0) { context = context_new (con); - values[0] = build_string (context_user_get (context)); - values[1] = build_string (context_role_get (context)); - values[2] = build_string (context_type_get (context)); - values[3] = build_string (context_range_get (context)); + if (context_user_get (context)) + values[0] = build_string (context_user_get (context)); + if (context_role_get (context)) + values[1] = build_string (context_role_get (context)); + if (context_type_get (context)) + values[2] = build_string (context_type_get (context)); + if (context_range_get (context)) + values[3] = build_string (context_range_get (context)); context_free (context); } if (con)